add option to generate test coverage report without codecov#207
Conversation
8a31636 to
fba02a5
Compare
|
I tried this out on sunpy and it seems to explode. sunpy/sunpy#7668 |
|
It seems that it's not picking up the coverage.xml to upload here: https://github.com/sunpy/sunpy/actions/runs/9445798095/job/26014155532?pr=7668#step:14:16 🤔 |
Cadair
left a comment
There was a problem hiding this comment.
Thanks so much for taking a swing at this!
.github/workflows/tox.yml
Outdated
| - run: python -Im pip install --upgrade coverage[toml] | ||
| - run: python -Im coverage combine | ||
| - run: python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY | ||
|
|
There was a problem hiding this comment.
I think it would be nice to add the ability to fail this job based on either total coverage % or diff coverage %.
|
tl;dr -- this does not generate patch coverage, right? |
|
Not yet, but I found a way to make it. |
For patch coverage we'd need to store the coverage from |
325b539 to
156160e
Compare
|
I am trying this out too at spacetelescope/acstools#205 and it still crashes: https://github.com/spacetelescope/acstools/actions/runs/9463279566/job/26068438067?pr=205 |
oh whoops, I fixed the artifact issue: |
d8c63d1 to
c5b70cf
Compare
c5b70cf to
f891927
Compare
f891927 to
430ed7e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Even when CI passes, it failed with the same error.
|
it should be uploading / downloading the |
|
it looks like pytest --pyargs acstools --cov-report=xml --cov=acstools /home/runner/work/acstools/acstools/doc --cov --remote-data -v |
|
running |
|
What is the difference between |
I'm not intimately familiar with it, but as far as I know We could use |
|
Tried to debug at #209 but no luck. I see the coverage ran but the the upload failed: https://github.com/spacetelescope/acstools/actions/runs/9483014271/job/26134042811?pr=205 |
could you also add |
|
Ah, yes, added. New log: https://github.com/spacetelescope/acstools/actions/runs/9483014271/job/26138000458?pr=205 |
|
(my rant about pytest-cov now has its own issue #330) |
|
Phew, took me a while to get there, but I finally have something that works again: zacharyburnett#3 important notes: I couldn't, for the life of me, figure out where Footnotes
|
|
Oh and I just realized another important limitation : combining coverage data from different platforms is really tricky (TBH, I could never quite figure it out, but I did fiddle with this a couple times and the author claims it's possible). To the extent I understand how it's supposed to work, it should be possible to configure it on the user side. If we're going to release this in its current state, it should be advertised very clearly. |
|
Whoops. Guess why I didn't run pre-commit hooks locally ? (a clue: #328) |
|
Also, there's a job stuck because it's trying to use |
|
@Cadair how should we proceed to get CI green again ? |
|
pre-commit.ci autofix |
f36c9ff to
0ccd85e
Compare
0130578 to
cb41ea2
Compare
Co-authored-by: Stuart Mumford <[email protected]> Co-authored-by: Clément Robert <[email protected]>
328d7b7 to
8829089
Compare
|
Don't suppose you can move that uv commit to the uv PR? I think I'm happy to merge this otherwise? |
sure! |
8829089 to
be98dd6
Compare
|
Thanks everyone! |
| - name: generate coverage report | ||
| run: | | ||
| python -Im pip install 'pip>=25.1' | ||
| python -Im pip install --group covcheck |
There was a problem hiding this comment.
wait I just noticed this properly. This means that all the users of these workflows will need this in their package right? That seems bad (and undocumented) why wouldn't we just install coverage here?
There was a problem hiding this comment.
This means that all the users of these workflows will need this in their package right?
No, in this case this is checked out and installed from THIS repository using the covcheck group in pyproject.toml:
github-actions-workflows/pyproject.toml
Lines 23 to 37 in 9ed6008



using the guide here: https://hynek.me/articles/ditch-codecov-python/
This does not create coverage diffs or report to PRs, just creates a markdown summary table
closes #189
EDIT: here's what the summary table looks like:
